package
{
	import flash.display.MovieClip;
	import flash.display.Stage;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Humberto Anjos
	 */
	public class Background extends MovieClip
	{
		private var _offset:int = 5
		private var _stage:Stage
		
		public function Background(stage:Stage)
		{		
			_stage = stage
			_stage.addEventListener(Event.ENTER_FRAME, update, false, 0, true)
		}
		
		private function update(e:Event):void
		{
			this.y += _offset
			
			if (this.y >= _stage.stageHeight + this.height/2)
			{
				this.y = -this.height/2
			}
		}
	}

}